package br.ufrj.dcc.comp2.projeto.modelos;

/**
 * Classe basica representando um vetor em 2D.
 * @author Bruno
 *
 */
public class Vetor2D {
	/* Java não tem operator overloading? Oh my... */
	protected float X;
	protected float Y;
	
	public Vetor2D() {
		X = 0;
		Y = 0;
	}
	
	public Vetor2D(float X, float Y) {
		this.X = X;
		this.Y = Y;
	}
	
	public float getX() {
		return this.X;
	}
	
	public float getY() {
		return this.Y;
	}
	
	public void setX(float X) {
		this.X = X;
	}
	
	public void setY(float Y) {
		this.Y = Y;
	}
	
	public void addX(float X) {
		this.X += X;
	}
	
	public void addY(float Y) {
		this.Y += Y;
	}
	
	public void clear() {
		this.X = 0;
		this.Y = 0;
	}
}
